import service from '@/utils/request'
// @Tags Basket
// @Summary 创建Basket表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Basket true "创建Basket表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /basket/createBasket [post]
export const createBasket = (data) => {
  return service({
    url: '/basket/createBasket',
    method: 'post',
    data,
  })
}

// @Tags Basket
// @Summary 删除Basket表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Basket true "删除Basket表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /basket/deleteBasket [delete]
export const deleteBasket = (params) => {
  return service({
    url: '/basket/deleteBasket',
    method: 'delete',
    params,
  })
}

// @Tags Basket
// @Summary 批量删除Basket表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除Basket表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /basket/deleteBasket [delete]
export const deleteBasketByIds = (params) => {
  return service({
    url: '/basket/deleteBasketByIds',
    method: 'delete',
    params,
  })
}

// @Tags Basket
// @Summary 更新Basket表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Basket true "更新Basket表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /basket/updateBasket [put]
export const updateBasket = (data) => {
  return service({
    url: '/basket/updateBasket',
    method: 'put',
    data,
  })
}

// @Tags Basket
// @Summary 用id查询Basket表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Basket true "用id查询Basket表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /basket/findBasket [get]
export const findBasket = (params) => {
  return service({
    url: '/basket/findBasket',
    method: 'get',
    params,
  })
}

// @Tags Basket
// @Summary 分页获取Basket表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取Basket表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /basket/getBasketList [get]
export const getBasketList = (params) => {
  return service({
    url: '/basket/getBasketList',
    method: 'get',
    params,
  })
}
// @Tags Basket
// @Summary 不需要鉴权的Basket表接口
// @accept application/json
// @Produce application/json
// @Param data query request.BasketSearch true "分页获取Basket表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /basket/getBasketPublic [get]
export const getBasketPublic = () => {
  return service({
    url: '/basket/getBasketPublic',
    method: 'get',
  })
}
